package com.gtw.modules.api.service.impl;

import com.baomidou.mybatisplus.plugins.Page;
import com.gtw.modules.api.service.TbDiscussService;
import com.gtw.modules.dao.TbDiscussDao;
import com.gtw.modules.entity.TbCommodity;
import com.gtw.modules.entity.TbDiscuss;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;

@Service("tbdiscussservice")
public class TbDiscussServiceImpl implements TbDiscussService {

    @Autowired
    private TbDiscussDao tbDiscussDao;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return tbDiscussDao.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(TbDiscuss record) {
        return tbDiscussDao.insert(record);
    }

    @Override
    public int insertSelective(TbDiscuss record) {
        return tbDiscussDao.insertSelective(record);
    }

    @Override
    public TbDiscuss selectByPrimaryKey(Integer id) {
        return tbDiscussDao.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(TbDiscuss record) {
        return tbDiscussDao.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(TbDiscuss record) {
        return tbDiscussDao.updateByPrimaryKey(record);
    }

    @Override
    public Page<TbDiscuss> queryPageList(Page<TbDiscuss> page, Map<String, Object> map) {
        page.setRecords(tbDiscussDao.queryPageList(page, map));
        return page;
    }
}
